package com.bw.lib_mvi.viewmodel

import androidx.lifecycle.ViewModel
import com.bw.lib_mvi.intent.IUiIntent
import kotlinx.coroutines.channels.Channel

abstract class BaseViewModel<I : IUiIntent> : ViewModel(), IUiViewModel<I> {
    protected val _intent = Channel<I>(Channel.UNLIMITED)
    override val intents: Channel<I>
        get() = _intent

    init {
        handlerIntent()
    }

    abstract fun handlerIntent()
}